//
//  ApplicationObservable.swift
//  UICore
//
//  Created by 蒋晨成 on 2021/12/23.
//

import Foundation
import UIKit

public protocol ApplicationObservable: AnyObject {
    func applicationWillTerminate()

    func sceneDidDisconnect(_ scene: UIScene)

    func sceneDidBecomeActive(_ scene: UIScene)

    func sceneWillResignActive(_ scene: UIScene)

    func sceneWillEnterForeground(_ scene: UIScene)

    func sceneDidEnterBackground(_ scene: UIScene)

    func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)

    func scene(_ scene: UIScene, continue userActivity: NSUserActivity)
}

public extension ApplicationObservable {
    func applicationWillTerminate() {}

    func sceneDidDisconnect(_: UIScene) {}

    func sceneDidBecomeActive(_: UIScene) {}

    func sceneWillResignActive(_: UIScene) {}

    func sceneWillEnterForeground(_: UIScene) {}

    func sceneDidEnterBackground(_: UIScene) {}

    func scene(_: UIScene, openURLContexts _: Set<UIOpenURLContext>) {}

    func scene(_: UIScene, continue _: NSUserActivity) {}
}
